package com.jluzh10.learning.dao;

import com.jluzh10.learning.domain.Comment;
import com.jluzh10.learning.domain.Course;
import com.jluzh10.learning.domain.CourseExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.javassist.bytecode.LineNumberAttribute;

import java.util.List;

public interface CourseMapper {
    long countByExample(CourseExample example);

    int deleteByExample(CourseExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Course record);

    int insertSelective(Course record);

    List<Course> selectByExample(CourseExample example);

    Course selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Course record, @Param("example") CourseExample example);

    int updateByExample(@Param("record") Course record, @Param("example") CourseExample example);

    int updateByPrimaryKeySelective(Course record);

    int updateByPrimaryKey(Course record);

    /**
     * 根据评论更新课程评分信息
     * @param comment 评论
     * @return
     */
    int updateScopeById(Comment comment);

}